from django.test import TestCase

class MapTests(TestCase):
    fixtures = ['map']

    def test_row_iterator(self):
        from models import Map

        for row_num, row in enumerate(Map.rows_iterator()):
            for col_num, cell in enumerate(row):
                self.failUnlessEqual(row_num, cell.y)
                self.failUnlessEqual(col_num, cell.x)

